#include <iostream>

using namespace std;

int main(){

	int a,b,c,d;
	cin >> d ;
	a = d/100;
	b = (d/10)%10;
	c = d%10;
	
	cout << c << b << a;
	

    return 0;
}
